package com.zqxq.util;

import java.util.HashMap;
import java.util.Map;

public class Signature {
	public String signature = null;
	public String signParam = null;	
	private String timestamp = String.valueOf(System.currentTimeMillis());
	private static String HEADER_CHANNEL = "XM";
	private static String HEADER_IMEI = "868029020964425";
	private static String HEADER_APP_VERSION = "1.2.2";
	private static String HEADER_APP_KEY = "ZQXQ-DQK";
	private static String HEADER_APP_SOURCE = "1";
	private static String HEADER_PUBLIC_KEY = "040CD66A84025B94CEAC3EC1B49C92D0";
	
	public Map<String,String> signatureBuild(String paramsort) 
	{
		signParam = HEADER_PUBLIC_KEY + HEADER_APP_KEY + HEADER_APP_SOURCE + HEADER_CHANNEL + HEADER_IMEI + HEADER_APP_VERSION + paramsort + timestamp;		
		MD5 Sign = new MD5();
		signature = Sign.doMD5(signParam);		
		Map<String,String> map = new HashMap<String,String>();
		map.put("signature", signature);
		map.put("timestamp", timestamp);
		return map;
	}
	
	
}
